package cn.edu.gdut.deepcode.enums;

import cn.edu.gdut.deepcode.constant.GlobalConstant;
import com.baomidou.mybatisplus.annotation.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@ApiModel(value = "用户角色枚举",description = GlobalConstant.ROLE_ENUM_DESC)
public enum RoleEnum {
    NORMAL_USER("普通用户",1),ADMIN_USER("管理员用户",2);
    @ApiModelProperty("用户角色描述")
    private final String desc;
    @EnumValue
    @ApiModelProperty("用户角色标识")
    private final Integer flag;
    RoleEnum(String desc,Integer flag){
        this.desc=desc;
        this.flag=flag;
    }
}
